Let the cursor move to the right end of the entry text, even if it ends in
authorMatthias Clasen <maclas@gmx.de>
Sat, 3 Jul 2004 05:50:40 +0000 (05:50 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Sat, 3 Jul 2004 05:50:40 +0000 (05:50 +0000)
Sat Jul  3 01:48:19 2004  Matthias Clasen  <maclas@gmx.de>

* gtk/gtkentry.c (gtk_entry_move_visually): Let the cursor move
to the right end of the entry text, even if it ends in combining
marks.  (#141728, Theppitak Karoonboonyanan)

ChangeLog
ChangeLog.pre-2-10
ChangeLog.pre-2-6
ChangeLog.pre-2-8
gtk/gtkentry.c

index 99d12da1f084b9ab07f6f78b9755925a36c9eec8..b3c8c6fe1d1cc2b77fdce217f66f2e90e962a930 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Sat Jul  3 01:48:19 2004  Matthias Clasen  <maclas@gmx.de>
+
+       * gtk/gtkentry.c (gtk_entry_move_visually): Let the cursor move
+       to the right end of the entry text, even if it ends in combining
+       marks.  (#141728, Theppitak Karoonboonyanan)
+
 Fri Jul  2 23:34:33 2004  Matthias Clasen  <maclas@gmx.de>
 
        * gtk/gtkcombobox.c (gtk_combo_box_unset_model): Unset the displayed
index 99d12da1f084b9ab07f6f78b9755925a36c9eec8..b3c8c6fe1d1cc2b77fdce217f66f2e90e962a930 100644 (file)
@@ -1,3 +1,9 @@
+Sat Jul  3 01:48:19 2004  Matthias Clasen  <maclas@gmx.de>
+
+       * gtk/gtkentry.c (gtk_entry_move_visually): Let the cursor move
+       to the right end of the entry text, even if it ends in combining
+       marks.  (#141728, Theppitak Karoonboonyanan)
+
 Fri Jul  2 23:34:33 2004  Matthias Clasen  <maclas@gmx.de>
 
        * gtk/gtkcombobox.c (gtk_combo_box_unset_model): Unset the displayed
index 99d12da1f084b9ab07f6f78b9755925a36c9eec8..b3c8c6fe1d1cc2b77fdce217f66f2e90e962a930 100644 (file)
@@ -1,3 +1,9 @@
+Sat Jul  3 01:48:19 2004  Matthias Clasen  <maclas@gmx.de>
+
+       * gtk/gtkentry.c (gtk_entry_move_visually): Let the cursor move
+       to the right end of the entry text, even if it ends in combining
+       marks.  (#141728, Theppitak Karoonboonyanan)
+
 Fri Jul  2 23:34:33 2004  Matthias Clasen  <maclas@gmx.de>
 
        * gtk/gtkcombobox.c (gtk_combo_box_unset_model): Unset the displayed
index 99d12da1f084b9ab07f6f78b9755925a36c9eec8..b3c8c6fe1d1cc2b77fdce217f66f2e90e962a930 100644 (file)
@@ -1,3 +1,9 @@
+Sat Jul  3 01:48:19 2004  Matthias Clasen  <maclas@gmx.de>
+
+       * gtk/gtkentry.c (gtk_entry_move_visually): Let the cursor move
+       to the right end of the entry text, even if it ends in combining
+       marks.  (#141728, Theppitak Karoonboonyanan)
+
 Fri Jul  2 23:34:33 2004  Matthias Clasen  <maclas@gmx.de>
 
        * gtk/gtkcombobox.c (gtk_combo_box_unset_model): Unset the displayed
index 1fc2848769e1aadc3b005f6c6c66cdef8bc619f2..ff9919870ada3baa3b996840c9440ed5d3e63c4c 100644 (file)
@@ -3226,13 +3226,13 @@ gtk_entry_move_visually (GtkEntry *entry,
          count++;
        }
 
-      if (new_index < 0 || new_index == G_MAXINT)
-       break;
-
-      index = new_index;
+      if (new_index < 0)
+        index = 0;
+      else if (new_index != G_MAXINT)
+        index = new_index;
       
       while (new_trailing--)
-       index = g_utf8_next_char (text + new_index) - text;
+       index = g_utf8_next_char (text + index) - text;
     }
   
   return g_utf8_pointer_to_offset (text, text + index);